// XAmountUtil.ts

export class XAmountUtil {
    static roundAmt(amount: number, decimals: number = 2): number {
        if (isNaN(amount)) {
            // throw new Error('Invalid amount');
            return 0;
        }
        return parseFloat(amount.toFixed(decimals));
    }
}